1. Field of the Invention
The present invention relates to semiconductor storage devices that have non-volatile memory of the block-erase type such as flash memory in which a predetermined unit of area can be erased at one time.
2. Description of the Related Art
Compact semiconductor storage devices using flash memory without drivers, that is, non-volatile memory that can write and erase electrically, are gaining ground with the spread of portable information equipment such as portable computers and digital still cameras. Data is usually transferred in blocks of 512 bytes between an information processing apparatus (called host computer hereafter) and a semiconductor storage device using flash memory. Also, in flash memory built in the semiconductor storage device, data is erased in erase blocks that are predetermined data units. The size of one erase block is from several kilobytes to tens of kilobytes, which are considerably larger than the unit of data transfer (512 bytes).
When data is rewritten in flash memory, it is necessary to rewrite a whole erase block that contains the data. For example, when a data block of 512 bytes is rewritten, the data in the erase block that contains the 512-byte data block, that is, a data block of several kilobytes to tens of kilobytes, is first temporarily sheltered in another area. Then, after the block is erased, the new data is written in the erased block together with the remaining part of the sheltered data. Consequently, the efficiency of writing is not good. Further, in flash memory, the number of erase operations is limited by an upper bound. Therefore, if data rewrite is concentrated in a particular erase block, then the number of erase operations can exceed the upper bound in a short period, and the flash memory becomes unusable.
In order to solve these problems, Japanese Pat. Kokai Hei 5-27924 discloses a semiconductor storage device having an address conversion table. FIG. 8 is a block diagram illustrating the semiconductor storage device having an address conversion table. As shown in the figure, the semiconductor storage device 31 comprises an interface circuit 13, through which data is conveyed between a host computer 12 and semiconductor storage device 31, a CPU 15 that controls the whole semiconductor storage device 31, a buffer 17 that temporarily stores data during the processing of data requested by host computer 12, flash memory 33, an address-conversion table RAM 19 that stores an address conversion table that associates each logical sector address (logical sector number) transmitted from host computer 12 with a physical sector address (physical sector number) in flash memory 33, and a flash-memory control circuit 21 that controls flash memory 33. Address-conversion table RAM 19 consists in SRAM (static RAM) or DRAM (dynamic RAM).
In this construction, when CPU 15 rewrites data in semiconductor storage device 31, CPU 15 does not process the erase block containing the data to be rewritten, but writes new data in a free area in flash memory 33 together with the remaining part of the original data of the erase block. Then CPU 15 rewrites the address conversion table with the physical sector address of the new erase block. After that, CPU 15 can associate each logical sector address in host computer 12 with a physical sector address in flash memory 33 by referring to the renewed address conversion table, so that data in flash memory 33 can be accessed.
However, a semiconductor storage device using such an address conversion table has to construct the address conversion table in address-conversion table RAM 19 by searching all the data in the flash memory during the startup time of the semiconductor storage device. Therefore, processing time for constructing the address conversion table is required, so that it takes considerable time to start the semiconductor storage device. Further, if the capacity of host computer 12 for power supply is low, then host computer 12 fails fast by power consumption for the processing of the address conversion table. Further, the address conversion table associates a logical address with a physical address for each sector. Therefore, as the memory size of the semiconductor storage device increases, the size of the address conversion table increases, so that the memory size of address-conversion table RAM 19 becomes great. As a result, the total cost of the semiconductor storage device also increases.